<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-09-29 15:31:10
-->
<template>
  <div id="content" style="height: 95%"></div>
</template>
<script>
import { Gauge } from '@antv/g2plot';
export default {
  data(){
    return{
      l1_data:0.75,
    }
  },
  methods: {
    getdata(){
      const gauge = new Gauge('content', {
  percent: this.l1_data,
  range: {
    color: '#5B8FF9',
  },
  statistic: {
    content: {
      formatter: ({ percent }) => `Rate: ${(percent * 100).toFixed(0)}%`,
    },
  },
});

gauge.render();
    }
  },
  mounted(){
    this.getdata()
  }

}
</script>